<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title></title>
</head>
<body>
	<div id="app">
		<button type="button" @click="getsub">获取子组件d数据</button>
		{{die2}}
		<subcomp ></subcomp>
	</div>
	
	<script src="js/v2.6.10/vue.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		let subcomp = {
			
			template:`
				<div class="subcomp">
					
				</div>
			`,
			data(){
				return {
					sub2:'谁是水水水水'
				}
			},
			methods:{}
		}
	
	
	
		let myApp = new Vue({
			el:'#app',
			data:{
				die2:'哈哈哈哈'
			},
			methods:{
				getsub(){
					this.die2 = this.$children[0].sub2
				}
			},
			components:{
				subcomp
			}
		})		
	</script>
	
	
</body>
</html>